﻿using System;
using HAVNet.Core;


namespace HAVNet.Intros.AST
{
    public enum ASTExprPrimLitType
    {
        INT     ,
        REAL    ,
        CHAR    ,
        STRING  ,
        TRUE    ,
        FALSE   ,
        NULL    ,
    }

    public class ASTExprPrimLit : ASTExprPrim
    {
        public ASTExprPrimLitType   type    { get; set; } // solo para saber que es..
        public string               literal { get; set; }

        public ASTExprPrimLit (ASTExprPrimLitType type, string literal)
        {
            this.type   = type;
            this.literal= literal;
        }

        public override string ToString()
        {
            return literal + Lazy.toStringNN(_tails, "");
        }
    }
}
